home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / bindings / fun / sokoban.r < prev    next >
Encoding:
Text File  |  1996-09-27  |  3.1 KB  |  104 lines

  1. @ref-see-also See also in %s.
  2. @{{{}}}
  3. @{{{  sokoban-reference-file
  4. @if-using ( complete )
  5. @{{{  @sokoban-ref Description
  6. @if-using ( complete )
  7. This library defines  a  function  for  playing  the  well  known  game
  8. `Sokoban'. Therefor  the file `~/.orisokoban' is used to store the game
  9. boards. The  file  will be generated automatically with language Inmos,
  10. to prevent  problems with different fold marks. Each level is stored in
  11. a fold, using the following coding:
  12.  
  13. @ref-start-item #
  14. wall
  15. @ref-end-item
  16. @ref-start-item .
  17. base
  18. @ref-end-item
  19. @ref-start-item $
  20. stone
  21. @ref-end-item
  22. @ref-start-item *
  23. stone on base
  24. @ref-end-item
  25. @ref-start-item @
  26. cursor
  27. @ref-end-item
  28. @ref-start-item +
  29. cursor on base
  30. @ref-end-item
  31.  
  32. The library defines a own keyboard. So it can only be used for bindings
  33. with multiple modes.  The mode is named `sokoban-kbd'.  The functions
  34.  
  35. @ref-start-picture
  36.    soko-go-or-push-up, soko-run-or-push-up, soko-run-up
  37.    soko-go-or-push-down, soko-run-or-push-down, soko-run-down
  38.    soko-go-or-push-left, soko-run-or-push-left, soko-run-left
  39.    soko-go-or-push-right, soko-run-or-push-right, soko-run-right
  40. @ref-end-picture
  41.  
  42.  
  43. are not undeclared, so they can be bound  to  your  cursor  keys.  This
  44. library uses only the vi based bindings (hjkl).
  45.  
  46. You have to define a function `SOKOBAN-RESET-KBD', which resets the
  47. keytables to your default table.
  48. @fi
  49. @}}}
  50. @fi
  51. @if-using ( complete sokoban-call-ref )
  52. @{{{  @sokoban-ref Functions and macros
  53. @if-using ( complete sokoban-call-ref )
  54. @{{{  @sokoban-ref sokoban
  55. You can play the well known game. You have to push the pakets to the
  56. bases. Bases are marked with `.'. Pakets are marked with `$', or `S'
  57. on bases. Running or pushing through walls (`#') is not possible.
  58.  
  59. @ref-start-tbl Function 18 Key 3 Comment 36
  60. go-or-push-up     @@  k  @@
  61. run-or-push-up    @@  K  @@ repeat and stop at wall
  62. run-up            @@ C-K @@ repeat and stop at wall or paket
  63. go-or-push-down   @@  j  @@
  64. run-or-push-down  @@  J  @@ repeat and stop at wall
  65. run-down          @@ C-J @@ repeat and stop at wall or paket
  66. go-or-push-left   @@  h  @@
  67. run-or-push-left  @@  H  @@ repeat and stop at wall
  68. run-left          @@ C-H @@ repeat and stop at wall or paket
  69. go-or-push-right  @@  l  @@
  70. run-or-push-right @@  L  @@ repeat and stop at wall
  71. run-right         @@ C-L @@ repeat and stop at wall or paket
  72. undo-last-move    @@  u  @@ if repeated, only the last one
  73.  
  74. next-level        @@  +  @@ level has not to be solved
  75. previous-level    @@  -  @@
  76. save              @@  s  @@ not over different editing sessions
  77. reset             @@  r  @@ to last save or start, if no save
  78. restart-level     @@  R  @@ to start
  79.  
  80. quit              @@  q  @@
  81. describe-bindings @@  ?  @@
  82. @ref-end-tbl
  83.  
  84. Starting a level calls save automatically!
  85. @}}}
  86. @fi
  87. @}}}
  88. @fi
  89. @if-using ( complete )
  90. @{{{  @sokoban-ref Hooks
  91. @if-using ( complete )
  92. The libary defines a macro `abort-hook-add' and a OCL tag ABORT-HOOK-ADD.
  93. This macro should be added to your abort-macro! If needed, an existing
  94. macro `abort-hook-add' will be integrated!
  95.  
  96. The libary functions are marked as demand-loading.
  97.  
  98. If you do not wnt to use the default file `~/.orisokoban', define the tag
  99. and function SOKOBAN-FILE.
  100. @fi
  101. @}}}
  102. @fi
  103. @}}}
  104.